package com.useeinfo.oa.open.api.maintainOrder;

import com.useeinfo.oa.common.utils.ResultUtil.ResultDto;
import com.useeinfo.oa.modules.maintaining.biz.MaintainOrderBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


/**
 * 维保缓存工单
 */

@RestController
@RequestMapping("/api/maintainCache")
public class MaintainCacheAPI {

    @Autowired
    private MaintainOrderBiz maintainOrderBiz;

    //缓存工单详情
    @RequestMapping("/cacheOrderInfo")
    @ResponseBody
    public ResultDto cacheOrderInfo(String id,boolean type){
        return maintainOrderBiz.cacheOrderInfo(id,type);
    }

    //缓存上传接口

    /**
     *
     * @param temporaryData  维保内容
     * @param maintainOrderId 维保id
     * @param presenceDate 到场时间
     * @param presenceUser 到场人id
     * @param completeUser 完成人id
     * @param completeDate 完成时间
     * @param participantInputs 参与人信息
     * @param workProgress 工作流程
     * @param workLog 工作日志
     * @param enterpriseId 企业id
     * @param userId 人员id
     * @param repairOrders 报修单
     * @return
     */
    @RequestMapping("/SaveCacheOrder")
    @ResponseBody
    public ResultDto SaveCacheOrder(String temporaryData, String maintainOrderId, String presenceDate, String presenceUser, String completeUser, String completeDate, String participantInputs, String workProgress, String workLog, String enterpriseId,String userId,String repairOrders,String workRemark){


        return maintainOrderBiz.saveCacheOrder(temporaryData,maintainOrderId,presenceDate,presenceUser,completeUser,completeDate,participantInputs,workProgress,workLog,enterpriseId,repairOrders,workRemark);
    }
}
